#
from typing import Dict
import numpy as np
import torch

class IraUtils(object):
    @staticmethod
    def get_near_idx(src:torch.tensor, val:float) -> int:
        return torch.argmin(torch.abs(src - val))